//
//  ForgetKeyPassViewController.m
//  UI02_homework
//
//  Created by Hanlingyu on 16/7/15.
//  Copyright © 2016年 ltq. All rights reserved.
//

#import "ForgetKeyPassViewController.h"
#import "Ltq_textFieldLeftView.h"

#define WIDTH self.view.frame.size.width
#define HEIGHT self.view.frame.size.height
@interface ForgetKeyPassViewController ()

@property (nonatomic, strong) UIImageView *backGroundImageView;
@property (nonatomic, strong) UIView *backGroundView;
@property (nonatomic, strong) UIButton *backButton;
@property (nonatomic, strong) UILabel *titleLabel;

@property (nonatomic, strong) UITextField *phoneNumberTextField;
@property (nonatomic, strong) UITextField *keyPassTestField;

@property (nonatomic, strong) UIView *phoneNumberLineView;
@property (nonatomic, strong) UIView *keyPassLineView;

@property (nonatomic, strong) UIButton *verificationCodeButton;

@property (nonatomic, strong) UIButton *nextStepButton;

@property (nonatomic, strong) UILabel *emailFindKeyPassLabel;
@property (nonatomic, strong) UIButton *emailFindKeyPassButton;


@end

@implementation ForgetKeyPassViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    self.backButton = [UIButton buttonWithType:UIButtonTypeCustom];
    self.backButton.backgroundColor = [UIColor clearColor];
    self.backButton.frame = CGRectMake(0, 20, 70, 44);
//    self.backButton.backgroundColor = [UIColor clearColor];
    [self.backButton setTitle:@"< 返回" forState:UIControlStateNormal];

    [self.backButton setTitleColor:[UIColor colorWithRed:0.00 green:0.68 blue:0.53 alpha:1.00] forState:UIControlStateNormal];
    [self.backButton addTarget:self action:@selector(backLastPage:) forControlEvents:UIControlEventTouchUpInside];
//    [self.view addSubview:self.backButton];
    
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:self.backButton];
    
//    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"< 返回" style:UIBarButtonItemStylePlain target:self action:@selector(backLastPage:)];
    
    
    self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 100, 50)];
    self.titleLabel.center = CGPointMake(WIDTH / 2, 90);
    self.titleLabel.backgroundColor = [UIColor clearColor];
    self.titleLabel.text = @"验证手机";
    self.titleLabel.font = [UIFont systemFontOfSize:23 weight:1];
    [self.view addSubview:self.titleLabel];
    
    
    Ltq_textFieldLeftView *phoneNumberTextFieldLeftView = [[Ltq_textFieldLeftView alloc] initWithFrame:CGRectMake(0, 0, 40, 40) backGroundColor:[UIColor whiteColor] image:[UIImage imageNamed:@"icon_username.jpg"]];
//    phoneNumberTextFieldLeftView.imageView.image = [UIImage imageNamed:@"icon_username.jpg"]
    [self.view addSubview:phoneNumberTextFieldLeftView];
    
    
    Ltq_textFieldLeftView *phoneNumberTextFieldLeftView1 = [[Ltq_textFieldLeftView alloc] initWithFrame:CGRectMake(0, 0, 40, 40) backGroundColor:[UIColor whiteColor] image:[UIImage imageNamed:@"icon_username.jpg"]];
    
    
    self.phoneNumberTextField = [[UITextField alloc] initWithFrame:CGRectMake(0, 0, WIDTH - 20, 50)];
    self.phoneNumberTextField.center = CGPointMake(WIDTH / 2, 150);
//    NSString *str = [NSString stringWithFormat:@"手机号(仅中国大陆号)"];

    self.phoneNumberTextField.placeholder = @"手机号 (仅支持中国大陆号)";
    self.phoneNumberTextField.backgroundColor = [UIColor whiteColor];
    self.phoneNumberTextField.leftView = phoneNumberTextFieldLeftView;
    self.phoneNumberTextField.leftViewMode = UITextFieldViewModeAlways;
    [self.view addSubview:self.phoneNumberTextField];
    
    self.keyPassTestField = [[UITextField alloc] initWithFrame:CGRectMake(0, 0, WIDTH - 20, 50)];
    self.keyPassTestField.center = CGPointMake(WIDTH / 2, 201);
    self.keyPassTestField.placeholder = @"验证码";

    self.keyPassTestField.backgroundColor = [UIColor whiteColor];
    self.keyPassTestField.leftView = phoneNumberTextFieldLeftView1;
    self.keyPassTestField.leftViewMode = UITextFieldViewModeAlways;
    [self.view addSubview:self.keyPassTestField];
    
    
    self.phoneNumberLineView = [[UIView alloc] initWithFrame:CGRectMake(10, 176, WIDTH - 20, 1)];
    self.phoneNumberLineView.backgroundColor = [UIColor colorWithRed:0 green:0 blue:205 alpha:1];
    [self.view addSubview:self.phoneNumberLineView];
    
    self.keyPassLineView = [[UIView alloc] initWithFrame:CGRectMake(10, 227, WIDTH - 20, 1)];
    self.keyPassLineView.backgroundColor = [UIColor colorWithRed:0 green:0 blue:205 alpha:1];
    [self.view addSubview:self.keyPassLineView];

    
    
    self.verificationCodeButton = [UIButton buttonWithType:UIButtonTypeCustom];
    self.verificationCodeButton.backgroundColor = [UIColor clearColor];
    [self.verificationCodeButton setTitleColor:[UIColor colorWithRed:0.00 green:0.68 blue:0.53 alpha:1.00] forState:UIControlStateNormal];
    self.verificationCodeButton.frame = CGRectMake(300, 177, 100, 50);
    [self.verificationCodeButton setTitle:@"获取验证码" forState:UIControlStateNormal];
    [self.view addSubview:self.verificationCodeButton];
    
    
    self.nextStepButton = [UIButton buttonWithType:UIButtonTypeCustom];
    self.nextStepButton.backgroundColor = [UIColor colorWithRed:0.00 green:0.68 blue:0.53 alpha:1.00];
    self.nextStepButton.frame = CGRectMake(10, 250, WIDTH - 20, 50);
    [self.nextStepButton setTitle:@"下一步" forState:UIControlStateNormal];
    [self.view addSubview:self.nextStepButton];
    
    self.emailFindKeyPassLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 300, WIDTH / 2, 25)];
    self.emailFindKeyPassLabel.text = @"邮箱用户找回密码, 请";
    self.emailFindKeyPassLabel.backgroundColor = [UIColor clearColor];
    [self.view addSubview:self.emailFindKeyPassLabel];
    
    
    self.emailFindKeyPassButton = [UIButton buttonWithType:UIButtonTypeCustom];
    self.emailFindKeyPassButton.backgroundColor = [UIColor clearColor];
    [self.emailFindKeyPassButton setTitleColor:[UIColor colorWithRed:0.00 green:0.68 blue:0.53 alpha:1.00] forState:UIControlStateNormal];
    self.emailFindKeyPassButton.frame = CGRectMake(WIDTH / 2 - 35, 300, 80, 25);
    [self.emailFindKeyPassButton setTitle:@"点击这里" forState:UIControlStateNormal];
    [self.view addSubview:self.emailFindKeyPassButton];
    
}

- (void)backLastPage:(UIButton *)backButton {

//    [self dismissViewControllerAnimated:YES completion:^{
//    }];

    [self.navigationController popViewControllerAnimated:YES];
    
    
    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
